package com.wd.tw.service;

import java.util.List;
import com.wd.common.utils.DateUtils;
import javax.annotation.Resource;

import com.wd.tw.domain.entity.ElevatorCameraSignal;
import com.wd.tw.mapper.ElevatorCameraSignalMapper;
import org.springframework.stereotype.Service;


/**
 * 相机信号映射Service业务层处理
 * 
 * @author liumingkun
 * @date 2025-01-07
 */
@Service
public class ElevatorCameraSignalService
{
    @Resource
    private ElevatorCameraSignalMapper elevatorCameraSignalMapper;

    /**
     * 查询相机信号映射
     * 
     * @param cameraSignalId 相机信号映射主键
     * @return 相机信号映射
     */
    public ElevatorCameraSignal selectElevatorCameraSignalByCameraSignalId(Long cameraSignalId)
    {
        return elevatorCameraSignalMapper.selectElevatorCameraSignalByCameraSignalId(cameraSignalId);
    }

    /**
     * 查询相机信号映射列表
     * 
     * @param elevatorCameraSignal 相机信号映射
     * @return 相机信号映射
     */
    public List<ElevatorCameraSignal> selectElevatorCameraSignalList(ElevatorCameraSignal elevatorCameraSignal)
    {
        return elevatorCameraSignalMapper.selectElevatorCameraSignalList(elevatorCameraSignal);
    }

    /**
     * 查询相机信号映射列表
     *
     * @param elevatorCameraSignal 相机信号映射
     * @return 相机信号映射
     */
    public List<ElevatorCameraSignal> selectEnableSignalList(ElevatorCameraSignal elevatorCameraSignal)
    {
        return elevatorCameraSignalMapper.selectEnableSignalList(elevatorCameraSignal);
    }


    /**
     * 新增相机信号映射
     * 
     * @param elevatorCameraSignal 相机信号映射
     * @return 结果
     */
    public int insertElevatorCameraSignal(ElevatorCameraSignal elevatorCameraSignal)
    {
        elevatorCameraSignal.setCreateTime(DateUtils.getNowDate());
        return elevatorCameraSignalMapper.insertElevatorCameraSignal(elevatorCameraSignal);
    }

    /**
     * 修改相机信号映射
     * 
     * @param elevatorCameraSignal 相机信号映射
     * @return 结果
     */
    public int updateElevatorCameraSignal(ElevatorCameraSignal elevatorCameraSignal)
    {
        elevatorCameraSignal.setUpdateTime(DateUtils.getNowDate());
        return elevatorCameraSignalMapper.updateElevatorCameraSignal(elevatorCameraSignal);
    }

    /**
     * 批量删除相机信号映射
     * 
     * @param cameraSignalIds 需要删除的相机信号映射主键
     * @return 结果
     */
    public int deleteElevatorCameraSignalByCameraSignalIds(Long[] cameraSignalIds)
    {
        return elevatorCameraSignalMapper.deleteElevatorCameraSignalByCameraSignalIds(cameraSignalIds);
    }

    /**
     * 删除相机信号映射信息
     * 
     * @param cameraSignalId 相机信号映射主键
     * @return 结果
     */
    public int deleteElevatorCameraSignalByCameraSignalId(Long cameraSignalId)
    {
        return elevatorCameraSignalMapper.deleteElevatorCameraSignalByCameraSignalId(cameraSignalId);
    }
}
